package com.changgou.service.goods.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.changgou.goods.pojo.Spec;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SpecMapper extends BaseMapper<Spec> {
    @Select("SELECT spec.* FROM tb_spec as spec  inner join tb_category on spec.template_id = tb_category.templete_id " +
            " where name = #{categoryName} " +
            "order by seq")
    List<Spec> findListByCategoryName(@Param("categoryName") String categoryName);
}
